From c21f925d6de4b53121ca7d873095ce66ec7d339d Mon Sep 17 00:00:00 2001 From: robertlipe Date: Fri, 12 Jul 2013 17:23:55 +0000 Subject: [PATCH] MSVC fixes/workarounds from Gerhard Olsson. git-svn-id: http://gpsbabel.googlecode.com/svn/trunk@4421 f51c46e8-681c-474f-0cfe-069cfd0219fb --- gpsbabel/gbtypes.h | 3 ++- gpsbabel/lowranceusr.cc | 5 +++++ gpsbabel/lowranceusr4.cc | 5 +++++ gpsbabel/xmlgeneric.h | 2 +- 4 files changed, 13 insertions(+), 2 deletions(-) diff --git a/gpsbabel/gbtypes.h b/gpsbabel/gbtypes.h index d247648af..fb8a89c36 100644 --- a/gpsbabel/gbtypes.h +++ b/gpsbabel/gbtypes.h @@ -33,8 +33,9 @@ typedef unsigned long gbuint32; typedef unsigned short gbuint16; -typedef long gbint32; +typedef int gbint32; typedef short gbint16; +#include #else diff --git a/gpsbabel/lowranceusr.cc b/gpsbabel/lowranceusr.cc index 0c1685b5d..3171a255b 100644 --- a/gpsbabel/lowranceusr.cc +++ b/gpsbabel/lowranceusr.cc @@ -36,6 +36,11 @@ #include #include /* for lat/lon conversion */ +#if defined(_MSC_VER) +//Incomplete implementation, use existing GB function +#define lround si_round +#endif + typedef struct lowranceusr_icon_mapping { const int value; const char* icon; diff --git a/gpsbabel/lowranceusr4.cc b/gpsbabel/lowranceusr4.cc index db8ccfaa3..6f26cca10 100644 --- a/gpsbabel/lowranceusr4.cc +++ b/gpsbabel/lowranceusr4.cc @@ -30,6 +30,11 @@ #include /* for lat/lon conversion */ #include /* for gmtime */ +#if defined(_MSC_VER) +//Incomplete implementation, use existing GB function +#define round si_round +#endif + /* from waypt.c, we need to iterate over waypoints when extracting routes */ extern queue waypt_head; diff --git a/gpsbabel/xmlgeneric.h b/gpsbabel/xmlgeneric.h index 6a36414f4..0db91c61b 100644 --- a/gpsbabel/xmlgeneric.h +++ b/gpsbabel/xmlgeneric.h @@ -35,7 +35,7 @@ typedef struct xg_tag_mapping { const char* tag_name; } xg_tag_mapping; -extern char* xhtml_entities; +extern const char* xhtml_entities; void write_xml_entity(gbfile* ofd, const QString& indent, const QString& tag, const QString& value); -- 2.30.2